Access ASP.NET From Winforms?

Jul 24, 2011

Can i access ASP.NET Database From Withing Winforms Application ? If i expect it requires web server can i have any example, any online sites that can show me the pattern of simple web server?

View 1 Replies


ADVERTISEMENT

Winforms - 2010 Synchronize Two Access Databases?

Sep 15, 2011

I'm writing a desktop application that uses the main access database that will be hosted on a central server, but there will be a laptop with the app on that has an offline mode so records can be created offsite. When the laptop returns I want it needs to be synced back to the main database.

Has anybody got any pointers on a way to do this, I've briefly read about JRO but is there an alternative / better method?

Originally, I was just going to write some custom code to do this, but thought I'd check to make sure there wasn't something already out there.

View 4 Replies

Winforms - Use Custom Roles For User Access?

Sep 2, 2009

I have a winforms (VB 2008) based app that I'm developing and I want to use custom roles for user access.Application Layout:I have a Main form that opens a login form when certain actions occur.The Login form intern uses an authentication class that I've created, to authenticate users and set access rights.On my Applications settings page, I have Authentication Mode set to Application-defined because I cannot use Windows Authentication in the environment where this will be deployed.

The application uses a MS SQL 2005 db and the 3 tables I'm using in the authentication process are the User_Account , User_Roles and User_Access tables. The combination of an account in the User_Account and the roles within the User_Roles table are the bases for the User_Access table. Using the User_Access table is how I assign access to the various functions within the application

Authentication Method:To authenticate a user, I'm using the "My.User.CurrentPrincipal" (Code below) method. The My.User object works great and allows the use of "My.User.Name" property throughout the app when referring to the currently authenticated user.

Access Method:In order to set the current users access levels I'm using a function within my Authentication class and passing in My.User.Name as a variable. The function uses a Dataset Table Adaptor and a Select Case statement inside a For loop to assign all the access levels for the user (Function code below).

My Problem:This method of assigning access rights to a user does work but it's not persistent throughout the application as the My.User object is.I would like to find a way to create custom roles through the My.User object using its .IsInRole property. I would like to have these roles dynamically created using my User_Roles table.This would allow the custom roles to be used throughout my application using the My.User.IsInRole ("MyRole")syntax ...similar to how I'm currently able to use My.User.Name.Unfortunately the only roles I can currently validate against are the built in Windows
type accounts (Adminisrator ...ect.).

'User Authentication example:
If Authenticate.CheckPassword(tbxUserName.Text, strPassword) Then
My.User.CurrentPrincipal = New GenericPrincipal(New GenericIdentity(tbxUserName.Text), Nothing)[code].....

View 1 Replies

Winforms Webbrowser Control Access Label?

Jun 11, 2012

I have a question about the webbrowser control that I hope someone can answer. I am working on a document retrieval and storing class that uses HTML to display and save data. I want to use the webbrowser control in winforms using VB.Net. I only want to store the fields values in the html document, not the whole document. I am hoping to use labels in html and read them with the DOM of the web browser control but am not sure how to do this.

Has anyone done this before and could someone please provide some sample code on how to do this?

View 1 Replies

.net - Use A WinForms Application To Access A Database On A Centralized Server?

Nov 28, 2010

I want to connect a database that is located on centralized server. How can I use a windows form VB.NET application to access it? Is this possible?

How can I maintain a single user entry (e.x== used of INSERT command)?

Are both of the above things possible? If so, how can I go about implementing them?

View 1 Replies

VS 2008 Access XP 2002 Report Menu Via WinForms App?

Mar 8, 2012

Been casually working on getting my users out of the DB completely. We use a vb.net app I created as a front-end but there are many reports that were built in Access and I want to give my users a way to open Access and run the report via my WinForms app.

Have gotten as far as being able to open an instance of Access and do what I need to do. Where I left off was running into a problem with not being able to tell if an instance of the msaccess.exe process is running and use it instead of opening another.

View 1 Replies

Winforms - Access Different Forms Through A Loop And Change Label Text?

Oct 31, 2011

I have made a vb.net application which has 63 forms. On each form label2 should contain the username using the application. The first form displayed to the user is the login form. When the user clicks the login button on this form the user name in all newly opened windows should appear inside label2. How can I do this?

View 3 Replies

SQL Data Access: VB2008 / VB2010 - WinForms - Create A Datasourse And Drag / Drop Fields Or Tables On A Form To Create A Grid

Oct 22, 2010

I have used VB (versions 2 - 6) through many years; however, I am crash-course training myself into the VB2008 / VB2010 world kicking a screaming. I would like suggestions as to what SQL database access method should I focus more on in my learning process without making me feel that I'm a million years behind. I know I have WinForms where I can create a datasourse and drag / drop fields or tables on a form to create a grid (not really what I'm looking for).

My trouble isn't so much designing the form but in how I access the database. Theres XML, LINQ to SQL, ADO.NET, and many other methods. Not only do I need to grasp these methods quickly but I also need to know what type of projects I should create. What I mean is...I was thinking that I would design a WinForm app; however, I see that there are WPF apps and others to chose from. This is getting deep. I know it depends on the project that I'm working on. My plans are to write an app based off of either an SQL Express 2008 or SQL Server 2008 database. This first app will be standalone for now but may later become multi-user. I know I'm far behind on my learning curve coming from VB6. I have read a bit on VB2005 / 2008 / 2010. I own
both VB2008 and VB2010. I use VB2008 at work. I know ADO.NET is still alive but by what I read online, it's a dying method and is only kept for backward compatibility. XML and LINQ to SQL and other methods are all pretty new to me.

View 1 Replies

IDE :: Set Project Default For Winforms Projects S/ Default Modifier For Controls Added To Winforms Is Private

May 28, 2010

Is it possible to set a project default for VB.NET winforms projects so that the default Modifier for controls added to winforms is Private (not Friend)?I know there's a "modifiers" property in the properties window so I can set it for each individual control however I would like to change the project so from now on myself and other developers have to specifically decide to change from friend to private. (Which I would strongly discourage them from doing).I believe there is no way of doing this, but on another forum a while ago someone mentioned it would be possible with an add-in (but didn't name the add-in or where to get it).

View 1 Replies

Running Access - Application That Has An Ms Access 2007 DataBase Which Runns Great If Access Is Installed

Oct 15, 2011

I have an application that has an Ms Access 2007 DataBase which runns great if access is installed. Is there any code that I can use in vb that I would be able to run access with out installing it.

View 5 Replies

ASP.NET Vs Winforms App ?

May 11, 2009

I have a proto-type winform app designed by a colleague. My original plan was to create it using asp.net, but I'm not sure if I should just 're-create' it using asp.net or continue forward using the winforms. Either way, I'd use vb.net as the code-behind.

It's going to be a data collection app; originally it was going to allow the collection screens to by dynamically built, based on options selected by the end-users. However, that has changed to a one-size fits all approach.

I've never written anything using asp.net, so what I'd really like is some advice about what should I be looking for/at in this new app, in order to decide which way to finish it... asp.net OR winforms... Would there be any design/programming advantages to using asp.net over the winforms (other than the fact that my colleague already have about a dozen forms designed, but with NO code-behind)? Might there be end-user advantages to using asp.net vs winforms?

View 3 Replies

WPF App Vs WinForms App

Aug 10, 2009

I'm currently studying for one of Microsoft's MCPD 3.5 certifications (VB 2008) and one of the things it makes use of is WPF applications. Based on what I've seen of them so far, they are basically like Windows Forms Applications. So my question about them is why was WPF created? What was Microsoft looking to accomplish with WPF since outside of the "web feel" in a windows environment, it basically looks like a WinForms application. What is the difference between the two and when sould I use one over the other?

View 1 Replies

Animated GIF In Winforms?

May 28, 2011

Animated GIF in Winforms

View 9 Replies

C# - Controlling Cmd.exe From Winforms

Nov 5, 2010

Question: I want to control cmd.exe from winforms. I DO NOT mean every command in a single process, with startupinfo, and then stop. I mean for example start the (My) SQL or GDB command prompt, send command, receive answer, send next command, receive next answer, stop SQL command prompt exit process. Basically I want to write a GUI on top of any console application.

[Code]...

View 4 Replies

C# - WindowLicker For .NET's WinForms?

Jul 22, 2010

Is there anything like WindowLicker(a GUI test framework) but for .NET's WinForms?

View 3 Replies

CSS Be Used In A WinForms Application?

Mar 9, 2010

Can we use css formatting in a vb application to give some enhancement? Examples would be changing the font color and or background? Are there any other way to customize a (VB)desktop application?

View 4 Replies

Migrating From WinForms To WPF

Jun 25, 2010

We're building an application using VB.net and WPF. Obviously we've found that there are huge differences between the syntax in the two, and we have a few problems trying to do things in Form apps in WPF.If possible, could you pass us some resources on things like switching between WPF windows, we'd use Show() and Close() in WinForms, and referencing variables from other forms, i.e. otherForm.StrVariable references StrVariable from otherForm.

View 2 Replies

Using Random In Winforms?

Jan 14, 2012

I'm creating a playlist in Visual Studio 2010 Winforms and I would like to have allow the user to shuffle the songs played. I was thinking of something like:

If CheckBox1.Checked = True Then //Shuffle checkbox
Me.ListBox2.SelectedIndex = Random(20)
AxWindowsMediaPlayer.URL = ListBox2.SelectedItem
End If

And hopefully the 1 of the 20 songs in the ListBox2 will be randomly selected. But this code does not work; "Random is a type and cannot be use as an expression".

View 1 Replies

VS 2008 Using WinForms And Asp.NET Together?

Mar 7, 2012

I've come up against a rather tricky problem that I cant seem to find an answer to.I have a WinForms program that runs locally on a PC with a SQL Server Express database to store its data.There is also a remote database that i need to save data to the first time that the program is run (a registration type thing).

The remote database will only accept connections from known IP adresses so to get around this, I have set up an ASP.NET site on the server that the remote database resides on and the data will be saved from here.

In my program, I have a form that has a webbrowser component on it that points to the asp site (with me so far?).The user fills in the form and clicks a button on the form that will fire the form to submit, save the data on the remote DB and retrieve a serial number that is displayed on the screen.

[Code]...

View 1 Replies

Way To Customize WinForms

May 7, 2009

I would like to change just a little bit the outlook of the form's top region in my application (the icon, bar, and controbox), is there any way to accomplish this without using third party components ?, I'd like to have my own Winform control that inherits from Windows.Forms.Form.[url]...

View 6 Replies

Office Automation :: Controlling Access 2003 From 2005 - Error Occurs When - Access Any Property Of "access.Forms("frmTest")"

Jul 17, 2009

I have a program in VB.NET 2005. At some point I have to open an Access2003-Application for getting data in it. I do that by pretending my program is a human user and let it do all the work in Access as a human user would do. Filling Fields, pressing buttons etc. I use the Primary Interop Assemblies for that. So far so good. That code is in use for over half a year now. In the last week I got Office 2007 installed on my machine. Of course I tested the installed version of my program if everthing still works. Every test was succesfull. But if I do the same tests in Visual Studio it always crashes.

All I get is this Errormessage: {"Das COM-Objekt des Typs "Microsoft.Office.Interop.Access.FormClass" kann nicht in den Schnittstellentyp "Microsoft.Office.Interop.Access._Form3" umgewandelt werden. Dieser Vorgang konnte nicht durchgefhrt werden, da der QueryInterface-Aufruf an die COM-Komponente fr die Schnittstelle mit der IID "{66B22FB4-F70E-4F03-A00A-F76E9ADBBF10}" aufgrund des folgenden Fehlers nicht durchgefhrt werden konnte: Schnittstelle nicht untersttzt (Ausnahme von HRESULT: 0x80004002 (E_NOINTERFACE))."}

For all who can't read german:

"Microsoft.Office.Interop.Access.FormClass" can't be converted in to "Microsoft.Office.Interop.Access._Form3" ... Interface is not supported.

Code I use:

Dim access As Microsoft.Office.Interop.Access.Application = Nothing
.
.
.
access = New Microsoft.Office.Interop.Access.Application()

[CODE]...

The Error occurs when I try to access any property of "access.Forms("frmTest")"

View 5 Replies

Porting Winforms Application To C#?

Jun 24, 2012

Possible Duplicate: Porting VB.NET Winforms Application to C# .Is there any way to convert a vb.net winforms application into c# ? In terms of both code and .vb (forms) files.

View 2 Replies

.net - Set CurrentPrincipal In Winforms For All Threads?

Jan 4, 2011

In a .NET 3.5 Winforms app, after a user provides a username and password, I set a custom principal in the CurrentPrincipal property like this:My.User.CurrentPrincipal = Service.GetPrincipal(username)This is done in a method that is called using Invoke, because the originating thread is not the UI thread:Invoke(New Action(AddressOf doLogin))But when I click on a button in the Winforms application, the CurrentPrincipal property has been reverted to its default, the current Windows user.Dim lPrincipal = My.User.CurrentPrincipal ' not my custom principalApparently, using Invoke while setting the principal does not solve the problem. Is there another way to set the CurrentPrincipal property for all threads in the application?

View 1 Replies

.net - Winforms Menu As Array?

Jun 20, 2009

I know it most likely possible to access a winforms menu like an array but I am not seeing it in the menu designer of VS2008? What I mean is, my app has a typical menu bar across the top, with multiple items on each drop down. As it is written (I inherited this code), each menu item is a separate name, i.e.

myMenuOption1MenuItem
myMenuOption2MenuItem
myMenuOption3MenuItem
myMenuOption4MenuItem

[Code]...

Obviously I could set/unset each menu item by name, but for a lot of reasons I'd prefer to use loops.

View 3 Replies

.net 2.0 - .net Winforms Design / Layout?

Dec 2, 2010

I am working on a windows forms project that will allow a user to have an interface to the database, and another will be a nightly run process file that will update the database table.The user will add new records to the table, whereas the nightly process will update the columns with new values (think mortgage interest rates)

Both these projects will be using the same business logic component that has the calculations needed to enter values into the table.The way I am figuring this out, is that I will have two exe's (one for the interface and one for the nightly process) and have a central object that will host the calculations. What would be the best object for this purpose?A class file?A windows service? (I want to stay away from a windows service, because it will have to be running all the time)

View 2 Replies

Binding And Threads In WinForms?

Oct 27, 2010

In my Winforms application, i've got a form and an associated business layer class. All controls are bound. When i click a button i call a method on the class which then starts a background worker and returns. The background worker does some processing and finishes.

The problem i'm having is that i'm using a label to display any error messages generated by this background worker, which is fine but after a set time i want to clear the label, so for that i'm using a timer (on the business layer class), which, when it fires, is on a different thread and thus should not update the property that the label is bound to Whats the best way to do update the label? -- Should i be using a delegate to update the property value, if so how do i invoke it?Note i'm also having a problem with getting the databinding of the visible property on this label to work.

View 5 Replies

C# - Adding WinForms ListViewGroup In WPF

Jan 9, 2012

Check this:Can I add ListViewGroup in WPF? Or a equivalent to that?

View 3 Replies

C# - WinForms Interthread Modification?

Jul 10, 2009

Whenever I want to modify a winform from another thread, I need to use ->Invoke(delegate, params)so that the modification occurs in the winform's own thread.
For every function that needs to modify the gui, I need another delegate function.Is there some scheme which allows me to limit the number of delegate functions needed? I have a controller class which handles the whole gui in one spot, I've thought about reusing delegates but that smells badly.I think that my question can apply to all languages where winform can run

View 4 Replies

C# - WinForms TrackBar Control In .Net?

Apr 7, 2010

know the millisecond interval, used by the framework trackbar, between calling the ValueChanged event when moving the grip with a mouse?I've implemented my own trackbar and I'd like the behaviour to be consistent with what the user expects.I've had a look in reflector but it's one of those controls where most of the implementation is not viewable.

ETA: Actually, thinking about it, it's not as simple as that. For small changes, the TrackBar is raising the event for every change. However, if you make a large fast change with the grip, it will not raise the event for every step. Just wondering exactly how the framework does this?

View 1 Replies

C# :: Hosting IE 8 In WinForms And Opening A PDF?

Apr 30, 2009

We have a form that hosts the WebBrowser control. That is the only control on the form.We pass the form the file path of a temporary PDF file and it does:WebBrowser1.Navigate(Me._PathToPdf)When the form is closing, it navigates away from the PDF file:

WebBrowser1.Hide()
WebBrowser1.Navigate("about:blank")
Do Until WebBrowser1.ReadyState = WebBrowserReadyState.Complete

[code].....

View 4 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved