|
Hello,
[VS 2005]
I have created a user control that has a tab control, text boxes, combo boxes. I have a typed dataset with some datatables and tableAdapters for doing the inserts and the delete, and updates.
I build the control and when I want to use this control in another project.
1) open a new windows form project
2) Create a new tab on the tool box
3) Choose items
4) Browse to the dll in the release folder.
My question when I add the dll it also adds the typed dataset, table adapters. I have done something wrong as I think it should be the control itself and not the table adapters and the dataset. As when I click ok with the above selected it add them to my toolbox.
Can anyone explain about this, and if I have done done something wrong.
Many thanks for your help,
Steve
|
|
|
|
|
How to get or to collect all objects or controls in a form using vb.net? For example of controls are Textbox, Combobox and check box.
|
|
|
|
|
Every form has a Controls collection. This is where you'll find all the controls on the form. There's a little bit of a "gotcha" though. Controls can have Control collections of their own, so you can end up having controls inside other controls, like RadioButtons in a GroupBox or Panel.
You can enumerate the controls like this:
For Each c As Control In Me.Controls
If TypeOf c Is Panel Then
Dim tb As Panel = DirectCast(c, Panel)
' do whatever you want with the Panel you found
End If
Next
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
I'm trying to create password protected zip file from my vb.net application. But could not Is there anyway or component (especially free) which creates password protected zip files.
Thanks.
|
|
|
|
|
 Try with this Code.
Dim ZipFile As ChilkatZip2<br />
<br />
Private Sub Command1_Click()<br />
<br />
' Get the zip file name<br />
CommonDialog1.ShowOpen<br />
CommonDialog1.CancelError = True<br />
SourceFile.Text = CommonDialog1.FileName<br />
<br />
End Sub<br />
<br />
Private Sub Command2_Click()<br />
<br />
' Create a ChilkatZip object<br />
Set ZipFile = New ChilkatZip2<br />
ZipFile.UnlockComponent UnlockCode.Text<br />
ZipFile.NewZip OutputZip.Text<br />
<br />
' To create a WinZip-compatible password-protected Zip, simply<br />
' set the PasswordProtect property to 1, and set a password.<br />
' To unzip, WinZip will prompt for this password.<br />
ZipFile.PasswordProtect = 1<br />
ZipFile.SetPassword "secret"<br />
<br />
' Add the disk file to the Zip object<br />
ZipFile.AppendFiles SourceFile.Text, 0<br />
<br />
' See if anything was added.<br />
If (ZipFile.NumEntries = 0) Then<br />
ZipStatus.Caption = "Error, no files added to the Zip archive."<br />
Set ZipFile = Nothing<br />
Exit Sub<br />
End If<br />
<br />
' Compress and write to disk.<br />
success = ZipFile.WriteZip()<br />
If (success = 0) Then<br />
MsgBox ZipFile.LastErrorText<br />
Exit Sub<br />
End If<br />
<br />
' How much compression occured?<br />
Dim e As ChilkatZipEntry2<br />
Set e = ZipFile.GetEntryByIndex(0)<br />
If (Not (e Is Nothing)) Then<br />
origSize = e.UncompressedLength<br />
compressedSize = e.CompressedLength<br />
ZipStatus.Caption = "Success." + vbCrLf + Str(origSize) + " bytes compressed to " + Str(compressedSize) + " bytes"<br />
Set e = Nothing<br />
End If<br />
<br />
ZipFile.CloseZip<br />
<br />
Set ZipFile = Nothing<br />
<br />
End Sub<br />
<br />
Private Sub Form_Load()<br />
OutputZip.Text = CurDir$ + "\outputFile.zip"<br />
<br />
End Sub<br />
Regards,
Satips.
|
|
|
|
|
The code is nice and all, but where's he going to get the ChilkatZip2 class library from?
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
You can use the #ZipLib to do this. Find it here[^].
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
hi to alll
i need to blink the label in vb.net
plz help !!!!!!!!!!!
thanks in Advance;)
|
|
|
|
|
devkranth wrote: Very Urgent
No, it's not. Very Urgent is having to pee very badly. Hence, the icon for the Pee Pee Dance, .
devkranth wrote: i need to blink the label in vb.net
You'll have to create a custom label control for this, easily done by inheriting from the existing Label class. You'll need to add a Timer to your control, and a couple of properties and methods so you can set the blink rate and start and stop the blinking. Then it's just a matter of making the foreground color match the background color and changing it back to what it's supposed to be on every timer tick.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
Use a timer to set the Visible property of the label to either true or false.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
I have a specified printer that only can print paper with 78mm of width. So how to resize the width of report to fix in that printer.
Help me please or send solution to my email address:
Thanhtc249@yahoo.com.vn
thanks.
|
|
|
|
|
I am using the following code to list the accounts of my operating system.
Currently i have just two accounts namely
1.Administator
2.Guest
But it shows 6 accounts.
can i filter the query to make it to show the actual accounts.
Dim oQuery As New Management.ObjectQuery("select * from <br />
Win32_Account WHERE SIDType = 1")<br />
Dim osearch As New ManagementObjectSearcher(oQuery)<br />
Dim ocollection As ManagementObjectCollection = osearch.Get<br />
Dim oresult As ManagementObject<br />
For Each oresult In ocollection<br />
TextBox1.Text = oresult("Name").ToString & " "<br />
Next
Thank You
Pankaj
|
|
|
|
|
I think it is showing the real accounts, with the `hidden` accounts, such as the help and support account, if you have VMWare installed, __vmware_user__ and other things.
You could try:
For Each oresult In ocollection
Dim oname As String = oresult("Name").ToString
If Not oname.StartsWith("SUPPORT") Then
If oname <> "__vmware_user__" Then
If oname <> "ASPNET" Then
If oname <> "HelpAssistant" Then
textBox1.Text = oname & " "
End If
End If
End If
End If
I don't know if this'll work very well.
|
|
|
|
|
hey there,
i am working in an organisation that uses foxPro for its DB needs. We are trying to convert it to SQL. how do i do that? also is there a possibility to develop a VB (not .Net) appln that uses foxpro as its back end? If there is please give me a sample of that code or where i could find it. Please some help me out with some insights.
signing off is preci
|
|
|
|
|
preci wrote: We are trying to convert it to SQL. how do i do that?
No idea. I've never used FoxPro and, most likely, never will. I would assume that it would take a re-write of the entire database.
preci wrote: also is there a possibility to develop a VB (not .Net) appln that uses foxpro as its back end?
Sure. You'd use the OleDb database objects, just like you would with an Access database. YOu can find the correct connection strings here[^] at ConnectionStrings.com.
Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic 2006, 2007
|
|
|
|
|
hey there,
i am working in an organisation that uses foxPro for its DB needs. We are trying to convert it to SQL. how do i do that? also is there a possibility to develop a VB (not .Net) appln that uses foxpro as its back end? If there is please give me a sample of that code or where i could find it. Please some help me out with some in sights.
signing off is preci
|
|
|
|
|
i want to show records between two dates and my date datatype is varchar
i am inserting date in yyyy/mm/dd format
my record selection formula is
ir.RecordSelectionFormula = " {ViewPartyOrder.pcode}=' " + ComboBox2.Text + " ' and {viewpartyorder.orderdate}>=' " + DateTimePicker4.Value.ToString("yyyy/MM/dd") + " ' and {viewpartyorder.orderdate}<=' " + DateTimePicker3.Value.ToString("yyyy/MM/dd") + " ' "
ir is the object of crystal report
when i am using this i get blank record
but when i apply this into another table it works fine
|
|
|
|
|
try using ParameterRangeValue
Hope this may help u.
|
|
|
|
|
i m new in crystal report please send me some code
|
|
|
|
|
Hi based on my month and year input,
i need number of days in a month and number of sundays in that month, using sql query...,
i post this ques in sql place...,
but there i didn't get any reply..,
So if u guys know the query plz send me...,
Magi
|
|
|
|
|
Doing that in vb fairly easy, do you have to do it with SQL.
|
|
|
|
|
Hi all,
My Question is concerned with the setup and deployment project in vb.net2005.
I wanted to know.... , Is there any way that I may place my exe - into the system tray after complition of the installation of my program - programatically in vb.net 2005
Thanks and regards
Pankaj Garg
|
|
|
|
|
amaneet wrote: Is there any way that I may place my exe - into the system tray after complition of the installation of my program - programatically in vb.net 2005
No, you should write your app to behave this way, not try to make it work this way, after it is written.
Did you try google ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
You could tell the installer to execute your program after the installation has finished.
|
|
|
|
|
HI there,
so what's the logic to tell the Installer.... , to do a particular thing, before the complition of the installation.
I mean can i put my poject exe into the System Configuation Utility/StartUp
programatically , before the complition of the installation.
Thanks You.
|
|
|
|