|
Apparently my post was not completely clear . . .
When the user clicks on a folder - a list of companies is retrieved from the database to a dataset, therfore the listview values dynamically change each time the user clicks on a new folder. If the user checked 2 companies on the "A" folder - then clicked on the "B" folder - and went back to the "A" folder the items are no longer checked. Make sense?
Digicd1
-Everyday is a new opportunity
|
|
|
|
|
I am having a problem regarding opening a binary file in VB.net or Vb 6 and then
tramsmit it to a Serial port.
Please give a solution if any?
from Mayur Gondaliya
Mayur
|
|
|
|
|
I am new to VBScripting. have only worked on VC++,C# etc.Kindly help me with this.
I have to develop a module using VBScript. The VbScript should be able to open an existing .htm file(this .htm file has a list of drivers name and file name).
The VBScript has to basically be able to open this .htm file, pick out all drivers name and associated file name and log the driver and file names into a simple text file.
Being new to VBScripting i do not have an idea how to go ahead. Pls suggets me a way to do this - if there is a sample cose existing kindly inform me.
Thanks in advance.
Awaiting a reply soon.
Sincerely
Giftsana
|
|
|
|
|
hi i'm very novice in vb.net.this is my larning stage.
can any body tell me how can i read the field of database to make the login page.
if could then please provide th appropriat code
thanx
Aavesh
|
|
|
|
|
Hi Aavesh ,
This is the code to validate User ID & Password from DataBase.
If u r using SQL
imports System.Data.SqlClient
Dim Command as SqlCommand
dim DR as SqlDataReader
Dim Con as new SqlConnection("Server=server name;DataBase=database name;User Id=login id; Password=password;")
write this code in a Button Click.
Dim strCommand as String ="Select * from Login_Table where UserName_Column= ' " & txtUser.Text & " ' and Password_Column= ' " & txtPassword.Text & " '"
Command = New SqlCommand(strCommand,Con)
Con.Open()
DR = Command.executeNonQuery()
Con.Close()
If DR.HasRows = True then
MsgBox("Welcome")
Else
MsgBox("User Name or Password invalid")
End If
Dr.Close
With Regards,
Chandan Kumar
|
|
|
|
|
Hi there
i want to move to the next tab on click of a button.
Other than the tabstrip button . Please help me to solve this.
bharath.s
|
|
|
|
|
Try:
Me.tabcontrolname.SelectedTab = nameofthetab
or
Me.tabcontrolname.TabPages(x).Select() where x is the index of the tab you want selected
Dean
|
|
|
|
|
Go into the properties, under behaviors and you will find TabIndex, this gives you the order in which the buttons or anything on the screen that you can inter act with, the order in which the item is given focuse, if you want to move from one imput to the next, hope this helps.
|
|
|
|
|
hi all
good morning,
can any one please tell me how can i drag a textbox from one cell in a tablelayoutpanel and drop it to another cell of the same tablelayoutpanel.
this is very urgent
please see if any help can i get
thanks and regards to all
SP
|
|
|
|
|
void tblTemplate_DragDrop(object sender, DragEventArgs e)
{
try
{
if (tblTemplate.Controls.Count < tblTemplate.RowCount * tblTemplate.ColumnCount)
{
RasterImageViewer rViewer = (RasterImageViewer)e.Data.GetData("MyData");
Point loc = this.tblTemplate.PointToClient(new Point(e.X, e.Y));
int ColumnIndex = -1;
int RowIndex = -1;
int x = 0;
int y = 0;
while (ColumnIndex <= this.tblTemplate.ColumnCount)
{
if (loc.X < x)
{
break;
}
ColumnIndex++;
x += this.tblTemplate.GetColumnWidths()[ColumnIndex];
}
while (RowIndex <= this.tblTemplate.RowCount)
{
if (loc.Y < y)
{
break;
}
RowIndex++;
y += this.tblTemplate.GetRowHeights()[RowIndex];
}
this.tblTemplate.Controls.Add(rViewer, ColumnIndex, RowIndex);
tblTemplate.GrowStyle = System.Windows.Forms.TableLayoutPanelGrowStyle.AddColumns;
tblTemplate.PerformLayout();
}
else
{
return;
}
}
catch (Exception ex)
{
}
}
void tblTemplate_DragEnter(object sender, DragEventArgs e)
{
e.Effect = e.Data.GetDataPresent("MyData") ? DragDropEffects.Move : DragDropEffects.None;
}
write this code in move event of control which u want move
try
{
if (e.Button == MouseButtons.Left)
{
tblTemplate.AllowDrop = true;
RasterImageViewer objRaster = (RasterImageViewer)sender;
DataObject data = new DataObject("MyData", objRaster);
objRaster.DoDragDrop(data, DragDropEffects.Move);
}
}
catch (Exception ex)
{
}
|
|
|
|
|
Just what I was looking for - thanks...
|
|
|
|
|
I tried code from
http://support.microsoft.com/default.aspx?scid=kb;en-us;312839#XSLTH4156121122120121120120
As we are using window2003 we need to use CDOSYS code from given URL.
Its working on our side.
But giving problem on client side.
Can any one help me this?????
http://support.microsoft.com/default.aspx?scid=kb;en-us;312839#XSLTH4156121122120121120120
|
|
|
|
|
run a port sniffer on the server and see if any of the ports used are blocked on the firewall, or rely on IP or layer 2 broadcasts.
it may be an SMTP relay issue as well. if your sec policy disables the right that might be it.
I would typically advise against sending email from SQL (at least SQL2000). we had issues with it at work.
hey...slang is the vernacular for the vernacular...wow
|
|
|
|
|
hello my self is a beginner and this is my first question on vb code, I Like to now how to generate a vb code to show a picture ; as forum signature if img code is off and also html and smilies off. Is there a Way to show a picture in vb code? Thank you for any help. Greez Roger
-- modified at 0:42 Wednesday 5th April, 2006
|
|
|
|
|
line42 wrote: as forum signature if img code is off and also html and smilies off.
If you're hoping to show a picture in a forum, how do you expect your code to be run ?
In general, a picturebox lets you easily show a picture, Image.FromFile will let you load an image from the file system.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
hello guys anyone could help me on how to set column in MSHFlexGrid in VB.Net..... hope you can give a sample code.....
thanks!
|
|
|
|
|
There is no .Net component called MSFlexGrid, It is a COM component.
Right Click MSFlexGrid control
Select properties
Select General tab
Now you can create columns and rows
Regards,
Chatura Dilan
If at first you don't succeed, try; try again, so that you know
what not to do the next time. The answer is out there.
|
|
|
|
|
thank you! i tried that already what i mean is how can i set the column width of MSHFlexGrid? i have this code "MSHF.set_ColWidth(1, 1, 50)" in run time but the result is the column did not adjust i want it to be widen....sorry for the confusion i've made in my previous posted message i forgot to type "width" hehehe my question is how to set column width..... thank for your support!
|
|
|
|
|
you have used three arguments, wilde that's the error. You can use only two arguments according to this format
AxMSFlexGrid1.set_ColWidth(coloumn Number,width)
example
AxMSFlexGrid1.set_ColWidth(1,3000)
Regards,
Chatura Dilan
If at first you don't succeed, try; try again, so that you know
what not to do the next time. The answer is out there.
|
|
|
|
|
thanks chatura! i tried this format but it still didnt work......
AxMSFlexGrid1.set_ColWidth(coloumn Number,width)
example
AxMSFlexGrid1.set_ColWidth(1,3000)
but i tried this one it works ....
AxMSFlexGrid1.set_ColWidth(1, ,3000)
|
|
|
|
|
I am new to the vb.net thing and am trying to self teach myself so any help is appreciated.
I need to be able to make sure that a textbox entry is only numbers and that I can backspace it to remove a bad entry.
I think its probably something like a bunch of ASCII characters to reference and valadate the entry but I am not sure.
Sub Text_KeyPress(KeyAscii As Integer)
If uiEnterInterNumTextBox.Text = KeyAscii < 48 Or KeyAscii > 57 Then KeyAscii = 0
and uiEnterInterNumTextBox.Text = KeyAscii
End Sub
|
|
|
|
|
heres how I would do it. remember, in vb, try not to do it the hard way. most of the time you'll find an easy one.
BTW somthing seems wrong with your keypress event handler, I'm used to
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress
now if your working in vb 6 or VBA this code may not work.
by the way if this is homework, at least paraphrase... geta little edu for your money.
Sub Text_KeyPress(KeyAscii As Integer)
If isAllNumbers(uiEnterInterNumTextBox.Text)Then
KeyAscii = 0
uiEnterInterNumTextBox.Text = KeyAscii
End If
End Sub
Private Function isAllNumbers(ByVal teststring As String) As Boolean
Dim isgood As Boolean = True
For Each c As Char In teststring
If Not Char.IsDigit(c) and not(c = ".") and not( c = ",") Then
isgood = False
Exit For
End If
Next
Return isgood
End Function
hey...slang is the vernacular for the vernacular...wow
|
|
|
|
|
Or
You can use a MaskedTestbox to do it
Or
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress<br />
If (AscW(e.KeyChar) < 48 Or AscW(e.KeyChar) > 57) Then<br />
e.KeyChar = Nothing<br />
End If<br />
End Sub
Regards,
Chatura Dilan
If at first you don't succeed, try; try again, so that you know
what not to do the next time. The answer is out there.
-- modified at 23:25 Tuesday 4th April, 2006
'sorry.. when you use e.KeyChar = Chr(Keys.Back), other keys always do backspace's job. I corrected it. It must be e.KeyChar = Nothing
|
|
|
|
|
see...easy answers
hey...slang is the vernacular for the vernacular...wow
|
|
|
|
|
This is the code:
Private Sub btnReset_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnReset.Click
TextBox1 = Nothing
TextBox2 = Nothing
TextBox3 = Nothing
TextBox5 = Nothing
TextBox6 = Nothing
DateOfbirth = Now
TextBox7 = Nothing
TextBox8 = Nothing
TextBox9 = Nothing
TextBox10 = Nothing
TextBox11 = Nothing
Department = "Administration"
personal = New Personal
when i click the rest button nothing happens. when i use Form.reset() it doesnt change anything either. Can someone please help?
-- modified at 20:16 Tuesday 4th April, 2006
|
|
|
|