Topics
-
-
- Administrators
- 2 replies
- 1.1k views
Folks... I'm a newbie n hope some1 can help out here..I've a VBA Application (Intranet) which I'd need to check users role and authentication to enable/disable some components. I created a COM Class so that I could expose some properties of the IPrincipal Interface on the .NET framework for the VBA to check the roles...more like implementing.... If Me.User.IsInRole("MTN_Grp") Then .... If My.User.IsAuthenticated = True Then ...... The created COM Class builds perfectly...but can't figure out how to implement these on the VBA side or whether some more code is needed...Please check the attachment. Any help will be much appreciated.:confused: Tx CCW_Auth…
Last reply by far2low, -
-
-
- Administrators
- 1 reply
- 598 views
.exe .pdb .vshost.exe .xml Are some of files that are created in bin\Release folder. What are each of them and which ones should be distributed while creating setup and publish the application?
Last reply by PlausiblyDamp, -
-
- 0 replies
- 1.9k views
I have a windows form that interfaces with a sql database. There is a combobox bound to the parent table and when the users selects a record from the combobox, the parent record will load into a series of textboxes and the child records (up to 4 of them) will load into a datagridview. I have a data access layer which loads adapters for the parent and child tables. I have the parent record part figured out but the child rows are a problem. Here is my code and any help would be appreciated: Private Sub rrNoComboBox_SelectionChangeCommitted(ByVal sender As Object, ByVal e As System.EventArgs) _ Handles rrNoComboBox.SelectionChangeCommitted Dim aBindingSource As B…
Last reply by lorena, -
-
- Administrators
- 2 replies
- 881 views
Hi All, I have written a little web site that has a log in page. Once the user logs in I set a session variable to flag this event. When the user logs into the admin section there is a check on this variable to see if they logged in correctly and didn't just put the address in the address bar instead. On my local machine this works great for both I.E. and Firefox. However when I publish it on my Windows Server 2003 box it works great with Firefox but with I.E. the session variable is null once the admin page loads. Does anyone know why this is happening? Cheers, Dave.
Last reply by davearia, -
-
-
- Administrators
- 3 replies
- 1.3k views
I'm trying to acces "My.Computer.Clipboard" from a thread and I get an error "Object reference not set to an instance of an object.". Any ideas where I go wrong?? Here is my code (Form1 + one class). The program listens for a printscreen press in a low priority thread. And once the print screen is pressed it should save the picture to disk, but thats when I get the error. Form1 code: Public Class Form1 Public Shared Snooper As New SnoopClass Public Shared ImageCounter As Integer = 0 Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load 'Start snooping for Print Screen key press Snoo…
Last reply by JumpyNET, -
-
-
- Administrators
- 1 reply
- 899 views
Hi, My visual studio crashed today and I had to restart the pc, now the project I was working on just wont compile. I get the following errors Error 1 The item "obj\Debug\eMatrixAdminSystem.frmMainLayout.resources" was specified more than once in the "Resources" parameter. Duplicate items are not supported by the "Resources" parameter. Error 104 'Private Sub InitializeComponent()' has multiple definitions with identical signatures. How can I fix this, i've looked in the designer section of my form and the InitializeComponent method is only there once. Hope someone can help. Thanks
Last reply by PlausiblyDamp, -
-
-
- Administrators
- 3 replies
- 873 views
Hi all I am in the process of setting Visual Studio.net 2005 up on a new networked machine. Everything appears to have installed correctly, I have created a test application (hello world) that has a single page with the words "hello world". My problems occur when I try to run the project, as per normal the project runs from http://localhost/testapp/default.aspx. However I am getting a page cannot be displayed error. If I change the address and replace localhost with either my machine name or 127.0.0.1, the page will run correctly. Any suggestions on what I can do to solve this problem, one thing that I was considering was making a change to the virtual directo…
Last reply by mike55, -
-
-
- Administrators
- 1 reply
- 1.8k views
Please please can some one help me out here...this is making me so frustrated! I have a text file which I write some data to. I then print this text file in my c# class using the System.Diagnostics.Process() method. My code looks like this: //set the command to run via the cmd prompt command = "print /D:" + printerName + " " + fileName + Convert.ToChar(13); startinfo = new ProcessStartInfo(); // use command prompt startinfo.FileName = "cmd.exe"; // /c switch sends a command startinfo.Arguments = "/C " + command; // don't exec with shellexecute api startinfo.UseShellExecute = false; // redirect stdout to this program startinfo.RedirectStandardOutput = true; // don…
Last reply by PlausiblyDamp, -
-
- 0 replies
- 3.4k views
I am using the Windows Media Player in a C# application to play video files. It works great, except I don't want the user to be able to double click the control and have it play in full screen mode. I can pick up a double click event and do something with it, but it still moves to full screen mode afterwards. Anyone have any ideas? (I'm using the AxWMPLib.AxWindowsMediaPlayer).
Last reply by grip003, -
-
- Administrators
- 4 replies
- 711 views
VS 2005 C# SP1 always use the same executable file whenever I try to run my project, I've tryed to build, rebuild the project but the he puts always in the ...\Debug folder the same outdated .exe file. It also skips any error in my project which forces me to believe it is not compiling the code at all... Any Suggestions?
Last reply by EFileTahi-A, -
-
- 0 replies
- 750 views
hi folks to write a header in an aspx-file isn't hard (i thought). i'm using htmlhead and htmlmeta to create an add the new header. this seems to work fine, as the header can be seen in the page-source of the resulting page. but: if i use the fiddler (or firefox LiveHttpHeaders), the header isn't listed... what am i missing?? does anyone have any experiences in writing headers and checking them (by fiddler oder livehttpheaders)?? best regards george
Last reply by ganders, -
-
- Administrators
- Leaders
- 8 replies
- 1.3k views
I'm trying to convert a C# class into VB.net and have come up with a problem. The C# code is: public event MouseEventHandler OnMouseActivity; public void MySub() { if (OnMouseActivity != null) { } } And I would have guessed the VB.net equivalent is: Public Event OnMouseActivity As MouseEventHandler Public Sub MySub() If OnMouseActivity isnot Nothing Then End If End Sub But that does not work. The error message is "... is an event and can not be called directly." It's obviously some difference in the syntax in the way events are handled. I know that in C# you can call an event much like a function, but in VB.net you must use RaiseEvent. But upon fur…
Last reply by snarfblam, -
-
-
- Administrators
- 2 replies
- 1.6k views
I'm not sure the best way to do this. I need to write some unit tests that test that certain users have the ability to do certain things; the objects have role based permissions. The problem is that in order to do this I have to impersonate one of 4 test users to get the permission set that is going to be tested. While impersonating myself is quite easy I can't find any .NET libraries that allow me to create a Windows identity/principal and make the unit test run in the context of that user. Any ideas would be greatly appreciated. I'd prefer not to hit the Windows API's if possible; if that is the only solution, a pointer to someone who has already wrapped Logo…
Last reply by bri189a, -
-
-
- Administrators
- 2 replies
- 1.1k views
I am using the following to generate a field in a gridview. Is there a way to format the data? specifically this is a returned date of 1/1/2007, but it displays the 1/1/2007 12:00. I need to drop the 12:00. THe backend is SQL Server 2005. Do I need to format it there? <asp:TemplateField HeaderText="SD" SortExpression="StartDate"> <ItemTemplate> <asp:Label ID="Label15" runat="server" Text='<%# Bind("startdate") %>'></asp:Label> </ItemTemplate> <EditItemTemplate> <asp:TextBox ID="txtStartDate" runat="server" Text='<%# Bind("startdate") %>'></asp:TextBox> <…
Last reply by kcwallace, -
-
- 0 replies
- 2.5k views
I want to open a specific Access application from a Windows vb.net application so that I can access reports. I have gotten as far as Dim AccessApp as New Access.Application But don�t know how to point to the .mdb I want to, nor open it. Can somebody please show me how ? It�s probably not that hard but I just spent the whole day building a print form in vb.net, only to find out, even going in the bitmap direction as suggested by Microsoft, that one can no longer print forms from VB. And in this particular app, SQL Server Reports is not an option� Thank you, lauriemc :mad:
Last reply by lauriemc, -
-
- Administrators
- 1 reply
- 1.3k views
guys i have problem to store result of encryption AES 256 BIT or 128 BIT on SQL server 2000... can you suggest what datatype i should use for this? herewith i attach the class... please simple change the extention into .cs i use .net 2003 and C# and i use this function to get the encrypted data public string AES_encrypt(string plaintext) { keysize = Aes.KeySize.Bits128; byte[] plainText = new byte[16]; byte[] cipherText = new byte[16]; plainText = Encoding.Unicode.GetBytes(plaintext.PadRight(8,' ')); AesLib.Aes a = new Aes(keysize, new byte[16]); a.Cipher(plainText, cipherText); //label2.Text = Encoding.Unicode.GetString(cipherText);…
Last reply by PlausiblyDamp, -
-
- 0 replies
- 559 views
We are in the process of converting of VB 6.0 code to VB.Net. We use DBGrid and the question whenever i start to upgrade i got an error message "Upgrade failed: Exception occurred: The referenced component DBGrid is missing a design time license" do i need to buy another license can i use the one from VB 6.0? We currently are using ADO for our databases and needless to say we would like to keep the conversion as simple as could be. Thanks,
Last reply by jimwest1995, -
-
- Administrators
- Leaders
- 16 replies
- 1.8k views
I think Microsoft really stupid in allowing their high-end .net language to be decompile-able. What a joke? I had secure my VB6 application from decompiled in the olden day but, now in this new age, with this modern technology, my application is decompiled by my competitor. The source code is not a problem, but, the logic I had been written all this while. They just decompile and with just the first few classes, they got the logic on how do I communicate with my Dongle, how do I calculate my Activation code. What the f**k. seems few thread in extreme forums. Doesn't seem to have a real good solution/cure for this issue. Kinda fed up with this product now. I …
Last reply by snarfblam, -
-
-
- Administrators
- 2 replies
- 932 views
I was looking at my SQL Server 2000 Error logs. I noticed that just about once an hour i get the following error. Should I worry about it?
Last reply by kcwallace, -
-
-
- Administrators
- 1 reply
- 667 views
Hi what is the mechanism for which I could use to add functions to lists of certain classes? I'm guessing that there is one. So I want these lists to have some of the same functions: List (of Class1) List (of Class2) List (of Class3) The specific functions I'd want to add are like: .GetObjectFromName .GetIndexFromName So Each of Class1, Class2, and Class3 have a variable named "Name" I know about how to use interfaces but I'm not sure about how add an interface with a pre-existing class or collection object. Thanks
Last reply by PlausiblyDamp, -
-
Who's Online 0 Members, 0 Anonymous, 61 Guests (See full list)
- There are no registered users currently online