|
How do I use the installer?
|
|
|
|
|
What installer? Are you talking about creating an Installer Project for your solution?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Can someone please tell me how to put an icon (which is already created and stored as an icon file) on the top - left corner of the form and on the desktop?
|
|
|
|
|
In the properties of your Form, look for the Icon property. You can click on the button on this line and it will let you pick an icon from a file to use in the upper left corner of your form.
As for the desktop, this is NOT an icon, it's a shortcut pointing at your executable. The initial icon for this shortcut, when created, will be the icon used for the top left corner of your form.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Man...is everybody else off today? Seems like Dave and I are the only people here.;P
____________________________________________________________________________________
Does anybody (Dave ) know how to open a text file and load it into RichTextBox without using the OpenFileDialog?
I want a specific text file (the path will be hard coded, for now) to open and be read into a RichTextBox when the form opens.
Thanks
Brad
|
|
|
|
|
I got it!
RichTextBox1.LoadFile(filename As String)
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks Dave;)
You make it all seem so easy...;P
|
|
|
|
|
Me? Nooooooo... Heath in the c# Forum makes it all seem easy. I'm learning new stuff from him every single day. I can't build test/learning projects fast enough to keep up with all the little tidbits I'm picking up from him.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Well, I’m just glad that you are here in VB.NET to help us.
Brad
|
|
|
|
|
I asked this question earlier but I’m not sure if I’m asking it correctly or if it is just something that nobody knows how to do. I’ve spent days scouring the Internet and reading books and just can’t see how to do this one thing:
Display Thumbnails in a List Box
My Scenario:
I’ve created an explorer type application with a TreeView and a ListView. The TreeView is used to navigate through the directories on my computer. The ListView displays the contents of each directory.
What I want to do:
Instead of displaying a generic icon, I want to display a thumbnail view of every image file located in the directory.
I know that this is possible because in Windows Explorer under ‘View’ the ‘Thumbnail’ option is available and does exactly what I’m trying to do.
Thanks
Brad
|
|
|
|
|
You'll have to iterate through the files in the directory and, one at a time, TRY and generate a Thumbnail view of the file using whatever method you chose. If the file is a graphics type, then a thumbnail will be generated and you can display that, otherwise you'll have to supply the icon of the file as the Thumbnail image.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi to all
i am working on a project which is a small ide n includes controls on a forms. i want to save that form along with controls so that when i load it,, the new form is loaded with same control at same location n same properties using XML .....
plzzzzzzzzzzzzzzzzzz help me
|
|
|
|
|
Try something like this (the code is in C# but you'll get the ideea):
Declare a typed dataset -WorkspaceDataset- within your project, having a table for storing controls bounds, called Controls; the columns used to reposition and resize each and every control would be Top, Left, Width, Height.
Any other properties you would like to store- add them as columns. I guess you could have a table for each control type.
If you want to get really flexible, you could use Reflection and discover the properties for each of the control types, create the dataset dynamically according to each property type and do the same when retrieving their values.
The following is just a simple example, only for the bounds of the controls.
<xs:element name="Controls" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType>
<xs:sequence>
<xs:element name="IDControl" type="xs:ID" minOccurs="0" msdata:AutoIncrement="true" msdata:AutoIncrementSeed="-1" msdata:AutoIncrementStep="-1" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" />
<xs:element name="Name" type="xs:string" minOccurs="0" />
<xs:element name="ParentControl" type="xs:string" minOccurs="0" />
<xs:element name="Top" type="xs:int" minOccurs="0" />
<xs:element name="Left" type="xs:int" minOccurs="0" />
<xs:element name="Height" type="xs:int" minOccurs="0" />
<xs:element name="Width" type="xs:int" minOccurs="0" />
</xs:sequence>
</xs:complexType>
</xs:element>
//In the form that you want to serialize/deserialize, declare a dataset member from the above type
private WorkspaceDataset workspaceDataset = new WorkspaceDataset();
//read the dataset from a xml file
private void deserializeControls(string xmlFilename)
{
this.workspaceDataset.Clear();
try
{
this.workspaceDataset.ReadXml(xmlFilename);
//call this function for the form, which, in turn will call itself recursively for each of the children controls
this.deserializeControl(this);
}
catch(Exception e)
{
MessageBox.Show(e.Message + "\n\n" + e.StackTrace);
}
}
//reads the control bounds from the dataset, by the Name property of the control
private void deserializeControl(System.Windows.Forms.Control control)
{
try
{//retrieve only controls that are named, it will not work for datagrid columns and other controls that are not named
if(control.Name != null)
{
if(control.Name != "")
{//read the bounds of the control from the datasets' Controls table
DataRow[] ctls = this.workspaceDataset.Controls.Select(
"Name = '" + control.Name + "'");
if(ctls.Length > 0)
{
ControlsRow controlRow = (ControlsRow)ctls[0];
//set the bounds of the control
control.SetBounds(
controlRow.Left,
controlRow.Top,
controlRow.Width,
controlRow.Height);
}
}
}
//call the same function recursively for all the children of the current control
foreach(System.Windows.Forms.Control child in control.Controls)
{
this.deserializeControl(child);
}
}
catch(Exception e)
{
MessageBox.Show(e.Message + "\n\n" + e.StackTrace);
}
}
//serialize the controls bounds into a xml file
private void serializeControls(string xmlFilename)
{
//clear the current values that were retreived when deserializing and start from scratch
this.workspaceDataset.Clear();
//call this function for the form, which, in turn will call itself recursively for each of the children controls
this.serializeControl(this);
this.workspaceDataset.WriteXml(xmlFilename);
}
//store the bounds of the current control and calls itself recursively for all the control's children
private void serializeControl(System.Windows.Forms.Control control)
{
if(control.Name != null)
{
if(control.Name != "")
{
ControlsRow controlRow =
this.workspaceDataset.Controls.NewControlsRow();
controlRow.Name = control.Name;
if(control.Parent != null)
{
controlRow.ParentControl = control.Parent.Name;
}
controlRow.Top = control.Top;
controlRow.Left = control.Left;
controlRow.Height = control.Height;
controlRow.Width = control.Width;
this.workspaceDataset.Controls.AddControlsRow(controlRow);
}
}
//call itself recursively for all the children
foreach(System.Windows.Forms.Control child in control.Controls)
{
this.serializeControl(child);
}
}
I hope this will help. I know there is the XmlSerialization but I didn't really care about all the properties myself, just the bounds, and this one worked fine for me.
|
|
|
|
|
The ParentControl column doesn't really get used, at least so far, because I meant to have it for the case one would store more than one form, so then same names could be used for controls from different forms.
|
|
|
|
|
Hi
I'm looking for examples or articles of how to show data from a datagrid (from a database) to a text or excel file..
Thanks for any help.
|
|
|
|
|
Right here[^] on MSDN.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have created one document in .html. I have one html file with its supportive file and developed player for its viewing in my vb application. I want lmy user should click on one button and my program should make one ProgramName.Exe file. I want to add files programmatically in setup.exe and wehn this will be installed on reader's system. This Setup.exe will install required components (which i add at the time of creation) automatically and my main page will open in my vb application which is actually a viewer of .html files.
Actually i want to know how to create .inf, .cab or setup.exe file thru VB.NET coding.
Please help me out.
Many Many thanx in advance.
Early action will be highly appreciated.
Manish Thouri
manishthouri@indiatimes.com
manishthouri@rediffmail.com
Manish Thouri
Software Professional
manishthouri@indiatimes.com
manishthouri@rediffmail.com
|
|
|
|
|
You'd have to write your own custom Setup.exe from scratch. Something that will parse up an .INF file (which is just a text file), and perform the actions described there in. How that file is layed out and what is in it is completely up to you, since your writing the .EXE that will interpret it.
Also, there are no native methods in the .NET BCL that work with creating .CAB files. These are built using as an external tool. BTW: Setup's using .INF and .CAB files have been deprecated for years now.
With a Setup that interprets a .INF, you don't have to recompile the Setup.exe every time you want to make a change to the installation. All you do is modify the .INF file that describes the setup process and update the .CAB file with the appropriate files.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
The WebBrowser control can return a reference to the Office Document object.
See this[^] article for a look at how to do it. The code is in VB6, so you'll have to adapt it to VB.NET and your implementation of the WebBrowser control.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi Rage,
Thanks for the article. However I am facing a roadblack when it comes to trying to access the properties of the oDocument object.
The following is my translation of the Vb 6.0 code.
Private Sub MenuItem2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem2.Click
Dim OFD As New OpenFileDialog
Dim sFileName As String
'Find an office file...
With OFD
.FileName = ""
.Filter = "Microsoft Excel Files|*.xls"
.Title = "Select an Excel Document"
End With
If OFD.ShowDialog = DialogResult.OK Then
sFileName = OFD.FileName
oDocument = Nothing
Me.WBwr.Navigate(sFileName)
Me.URLCombo.Text = sFileName
End If
End Sub
- This enabled me to iniatilize the oDocument object to Nothing.
Then I wrote this code for the WebBrowser control
Private Sub WBwr_NavigateComplete2(ByVal sender As Object, ByVal e As AxSHDocVw.DWebBrowserEvents2_NavigateComplete2Event) Handles WBwr.NavigateComplete2
'On Error Resume Next
MsgBox(sender.GetType.ToString)
oDocument = sender.Document
MsgBox("File opened by : " & oDocument.Application.Document)
End Sub
- In the article in place of "sender", pDisp was the object. When I tried seeing the properties of the sender object it showed me only one item i.e., GetType. I am not able to access the Document object property here when I could do it in VB 6.0. No matter how much I have tried I simply cant access the Document property.
Halp!!!!!!
vijaykri
|
|
|
|
|
vijaykri wrote:
When I tried seeing the properties of the sender object it showed me only one item i.e.,
You won't see anything in Intellisense because oDocument is bound to a generic Object type, sender . The only property your going to see in that case, is the method GetType(). The only way you're going to see the Excel object model in Intellisense is if you cast sender to a variable of type Excel.Application . But that would mean you have to set a reference to and import the Microsoft Excel Object Library for the version of Excel you have installed on the machine.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi Dave,
Thanks for the Intellisense clue... I simply hardcoded a few lines without depending on the Intellisense feature. And voila it worked beautifully.
Following is a sample
Private Sub WBwr_NavigateComplete2(ByVal sender As Object, ByVal e As AxSHDocVw.DWebBrowserEvents2_NavigateComplete2Event) Handles WBwr.NavigateComplete2
On Error Resume Next
oDocument = sender.Document
Dim s As String
s = oDocument.Application.Range("A3")
Dim oExcel As Excel.Application
Dim wbk As Object
wbk = oDocument
With wbk.ActiveSheet
'read
MsgBox(.Range("A3").Value)
End With ' wbk
wbk = Nothing
'MsgBox(CStr(oDocument.Application.Range("A4")))
'MsgBox("Value : " & oDocument.Application.Range("A3"))
End Sub
Thanks
You were of gr8 help
Vijay
vijaykri
|
|
|
|
|
hi
i am interested in programming a combination mp3 player / voice recorder for my pocket pc (using VB.NET). this is for an usual application (tape logging) and am having a hard time finding example source code for either a simple mp3 player or voice memo recorder.
if someone could point me in the right direction or send some sample source code to put me on the right track, it would be most appreciated.
thanks
|
|
|
|
|
I just tried a search on Yahoo for "pocket pc audio record", and came up with a bunch of stuff for audio playback and record. You'll have a lot of reading to do though. It's not as easy as it would sound.
Yahoo results[^]
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Iam making a BooksFairGuide and i was thinking of using a XML Schema and XML file as a small database to store the data into but i didn't know exactly how to do that and then i thought if i can make the XML file store that data then i can extract it into SQL database later but the problem is how can i make the program when i hit the add button save the data into the XML file
"Open Source" Millions of free minds can't be wrong
|
|
|
|