|
ei,
Public Sub GravaConfiguracao_Fideliza(ByVal intESC As Integer, ByVal dblVE As intPE As Integer)
can you tell what this parameter declaration mean. if confused about the double AS
is that a valid statement?
GUERVEN
Xuriuxs
|
|
|
|
|
Hi!
I'm sorry about the mistaken code...
The correct one is as follows:
Public Sub GravaConfiguracao_Fideliza(ByVal intESC As Integer, ByVal dblVE As Double, ByVal intPE As Integer)
Dim strInsert As String = "Insert Into Configuracao (Escalao, ValorEscalao, PontosEscalao) Values (" & intESC & ", " & dblVE & ", " & intPE & ")"
Thnaks
Jorge
|
|
|
|
|
Use the ToString method to convert the value instead of using implicit conversion. Then you can specify a culture or format provider. Use CultureInfo.InvariantCulture or NumberFormatInfo.InvariantInfo to get a format that uses decimal period.
---
b { font-weight: normal; }
|
|
|
|
|
Hi!
I solved the problem thanks to you.
Thank you very much for the tip!
Jorge
|
|
|
|
|
Hello, I am trying to write a user, user group and server administration program. But I'm a bit stuck when it came to writing the currently logged on users and sessions.
Any help and/or source would be much appreciated.
Aaron
I forgot I use Visual Basic .NET 2005
Thanks
|
|
|
|
|
I'm hashing a string, and the hash function is then returning a byte array. Is there any way to turn that byte array into a string? (ex. "0x028924E0FA2932")
Background: I'm trying to insert binary data into a SQL Server DB and I want to see if i can combine all the fields to create a single INSERT query so i can insert it into the DB without hassling with a dataset.
|
|
|
|
|
I had to do this for a program I wrote...
Best I could come up with:
imports system
dim bytes() as byte = { <Your bytes> }
BitConverter.ToString(bytes, 0, bytes.Length)
Since the format it uses is a little weird (seperated by dashes), I needed to add some extra processing for my app...
BitConverter.ToString(bytes, 0, bytes.Length).Replace(CChar("-"), CChar(","))
This delimits the bytes with commas (usefull probably only to me) but if you are creative with the string manipulation, you can do damn near anything!
Hope this helps!
|
|
|
|
|
Oh wow, you're right. That worked beautifully. Thanks a bunch!
|
|
|
|
|
Why not use base 64?
The method Convert.ToBase64String turns a byte array into a base 64 encoded string.
---
b { font-weight: normal; }
|
|
|
|
|
I don't believe the output of System.Security.Cryptography.sha1managed.computehash() is base64, and that's what I'll be comparing this against.
-- modified at 17:14 Wednesday 26th July, 2006
Actually I'm getting ahead of myself. You'd be best to ignore me...
|
|
|
|
|
Hello all, i am new here and have been assigned a project. We have a need to delegate a small group of individuals the ability to disable and enable AD users in a certain OU. Instead of giving them access to ADUC, i wanted to build a small VB app that consists of a combo box that displays the users in the OU, then a radio button for enable account and another for disable account. Then an apply button and cancel at the bottom. I am new to coding and generally have just gotten snippets and modified them to my own use in the past, but i am having a ahrd time finding the sippet to do what i need. I figure this is an easy one for all of you experts out there. If anyone can lend me a hand, i would be appreciative!
Thanks
Parry
|
|
|
|
|
Hey Parry!
Although I am not new to programming, I am new to VB.NET. That said, perhaps we can pool our minds and come up with a solution for you.
I believe I know what you are trying to do but in order to assist you further I need clarification on the following:
AD
OU
ADUC
How you are storing the users
How you plan to store whether a user is "enabled" or "disabled"
Thank you!
|
|
|
|
|
AD - Active Directory
OU - Organizational Unit
ADUC - Active Directory Users and Computers
I have searched for ways to query active directory (ad) but is it somewhat confusing. Within the Active Directory there are "organizational Units" They work somewhat like file folders in which the users and computer accounts are stored.
How you are storing the users. I would like for the program to just store the "usernames" in the combo box. I do not care if they are all lost when the program is closed. Then I would like to use the "username" selected from the combo box to be stored as a variable to use when the "apply" button is pressed.
How you plan to store whether a user is "enabled" or "disabled" - I would like to read that form Active Directory, if possible and then reflect the status on the radio buttons "checked" field. I was able to code to turn off one if the other is on
In the end, when the "apply" button is pressed, i would like the user selected in the combobox to have the status applied based on the status of the radio button.
Thanks for your help.
|
|
|
|
|
Hi - how would one go about exporting a datagridview to MS Word? I have numerous (dynamically created) dgvs, and they need to get on a Word document (for reporting purposes) - including cell colors and row/column headers.
can't find anything like this (basically a cut and paste operation)
Any guidance would be sincerely appreciated - thank you in advance.
Cheers,
- James
|
|
|
|
|
[Thank you, Joshua -->
reply:
Hello, James!
I was able to find some code to do precisely that here on codeproject. The code to do so is as follows:
Response.Clear();
Response.AddHeader("content-disposition", "attachment;filename=FileName.doc");
Response.Charset = "";
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.ContentType = "application/vnd.word";
System.IO.StringWriter stringWrite = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite);
myDataGrid.RenderControl(htmlWrite);
Response.Write(stringWrite.ToString());
Response.End();
The URL actually has code for exporting to Excel, Word and Text files and can be reached via the following link:
http://www.codeproject.com/aspnet/DAtaGridExportToExcel.asp[^]
/]
May I ask for a little more help though (d'oh! ). My dgvs are on a windows form (VS.2005) - and I'm not quite sure if these objects are viable in this environment (i.e. - the HttpTextWriter is not found in System.Web)
so, looking away from the syntax of this, functionally what is happening is that each line of data from my datagridview is being sent to the writer - which then inserts it into the word doc, correct? If so, this shouldn't include formatting, colors, etc. - correct?
looks like i should be able to do this by pushing it line by line into excel and formatting there - and then automating a cut and paste operation into word - but that's a little excessive!
ideas? (thanks again for the help)
|
|
|
|
|
When is it appropriate to use one over ther other when closing/cancelling a form? Advantages, disadvantages, memory leaks?
|
|
|
|
|
If Dispose is implemented, you should use Dispose after calling Close. But since not everyone follows the intended design, you should read about the implementation if you are using third party Classes
|
|
|
|
|
|
Hi, I was wondering if anyone could help me.
I am trying to write a Terminal Server administration program and would be very grateful for some advise on how to display all the currently logged on users.
I would also like it to display the session type, ID, logon time, and the current state, of all the users in one ListView. A bit like the Terminal Server Manager by Microsoft. Help would be appreciated and I am using VB.NET Express Edition. Code would be helpful, Thanks.
|
|
|
|
|
This might sound a bit hard but any advice would be appreciated, even if its just a tiny bit of code. Thanks
|
|
|
|
|
Hi people... i am completely new to vb express. I got a code to finish for my school project and it need to use linked list in it. i tried doing it using some of the code put up on net, but i get an error saying VB doesnt support certain statements... I need someone to help me please... i have to finish this by saturday..
-- modified at 14:24 Wednesday 26th July, 2006
|
|
|
|
|
Show the trouble code and someone might be able to help some. But don't expect anyone to do your homework assignment for you.
|
|
|
|
|
I have an MDI application. The parent window has a MenuStrip (MS1) with the common commands, and the child window has a menu strip (MS2) with some specific commands.
When the child window is maximized, the commands from MS2 are correctly merged into MS1. However, the menu strip itself still gets rendered across the top of the child form, so it looks as though there is one menu strip above the other. Basically, all the menus get moved from the MS2 into MS2, but MS2 still renders, just as an empty Menu Strip.
How can I prevent this behavior?
I would prefer if the menu strips merged as they do now, but when merged, the child forms menu strip was not drawn.
|
|
|
|
|
I created a table with 4 column. ProductID is one of them but I don't want to show this column. I set the DataSource of a DataGrid to this TABLE. However, vb.net doesn't like it when I use
mygrid.Columns("ProductID").Visible
Is there a way to hide this column? Any comment would be much appreciated.
nImStucked
|
|
|
|
|
I used this set of FAQs to help me tinker with my datagrid, so it might help you out: http://www.syncfusion.com/FAQ/WindowsForms/FAQ_c44c.aspx
|
|
|
|