|
Just as another note, Windows passes any files to be opened as command line arguments. If you get any arguments which pass file paths (ie System.IO.File.Exists returns true), then you need to open them
Between the idea
And the reality
Between the motion
And the act
Falls the Shadow
|
|
|
|
|
Does your application handle command line arguments and handle them correctly?? I'm guessing probably not. That's how Explorer tells your app which file was double-clicked. The command line it would use to launch your app would look something like:
C:\Program Files\MyApp\MyEditor.exe "C:\some folder\some other folder\folder\MyTextFile.txt"
|
|
|
|
|
Take a look at this[^]. It contains code snippets and a demo porject project ( I really must learn to type ).
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
modified on Sunday, June 21, 2009 5:22 PM
|
|
|
|
|
Hello -
I am trying to open up an excel file. I am writing this from a Ribbon Command Button using VSTO. My main goal is to open an existing file (\\musabiralo\musa.xls).
When I try this, it opens up in a new Excel Workbook, not too surprised but what I really want to open on existing workbook. Question is how can I do that?
Dim xlApp As New Excel.Application
Dim xlsWB As Excel.Workbook = xlApp.ActiveWorkbook
xlApp.Workbooks.Open(fileFullPath, , True)
xlApp.Visible = True
Thanks a lot.
|
|
|
|
|
musabiralo wrote: but what I really want to open on existing workbook.
You're saying that you already have a workbook open and you want to open a different workbook, merging the two?? You can't. You have to import the data from the other workbook.
|
|
|
|
|
Greetings:
I am back on this question again. My work around did not work.
Let me explain what I am trying to ask here:
I have a 'blank' excel workbook already open which I see in my taskbar. Now I want to open an excel file in this blank Excel which is already open.
If I do "Dim xlApp As New Excel.Application", this will open a new Excel file. If I do "Dim xlApp As Excel.Application", this will cause "Null Reference ..." thing
So, how can I reference the already open excel work book or how can I open the existing excel file in already open excel workbook?
Thanks.
|
|
|
|
|
I am trying to decode a mp3 to wav using Lame.exe. The wav file gets created but, I am having problems trying to get the percentage done to show on a progressbar and the current % in a label.
After trying for about a week now, I want to go a differerent way. Can anyone point me to a site that has a DLL and sample code in VB 8or9? It seems to me that the "MP3 to Wav" subject does not exist in the VB world. I already been to a multitude of sites and 99% of them deal in C++ or DirectDraw which I do not want because converting C++ to VB has a lot of problems, especially (SizeOf) which has no equal in VB. There are a lot more, but that is getting off the subject.
THNX for any help in advance.
rspercy
1 + 1 = 186,440....Depending on the species.
|
|
|
|
|
You have two options. The first is to use a library, like this: DLL To Decode MP3 To WAV/PCM. The second is to manually parse the MP3 file format and write the WAV file yourself
FYI: SizeOf does indeed have an equivalent. In classic VB, you could have used Len. Nowadays, you can use System.Runtime.InteropServices.Marshal.SizeOf
Between the idea
And the reality
Between the motion
And the act
Falls the Shadow
|
|
|
|
|
I already have this...It does not compile on my machine. I had to upgrade it to VS 2008 and in doing so, it displayed a crap load of errors. So I deleted it from my machine. I tried the Marshal.SizeOf and it still didnt work. Speaking of things that are not working, when I try to add the wmp.dll to my toolbox, I get ( dllRegisterServer in wmp.dll did not Load ) or something to that effect. I know it does not load in the Express Editions, but Im using VS 2008 Pro. It might be the VS install did not install quite correctly. I might have to uninstall it and do a complete install all over again.
THNX anyway for your time and patience.
Regards; rspercy60
rspercy
1 + 1 = 186,440....Depending on the species.
|
|
|
|
|
go to the project>Add Reference>Browse
and there add wmp.dll
its in the system32 folder
cheers
TheMrProgrammer
|
|
|
|
|
Hi all..
I have created a .Net desktop application by using NHibernate.
I want to use ClickOnce Deployment but i am getting problem that hibernate.cfg.xml not found..
The specified file is placed in debug and release folders.
Also, when we include Application Files in Publish settings, hibernate.cfg.xml not shown there..
Plz help me out...
Ovais.
|
|
|
|
|
I had this problem too.
To bypass i used the app.config to do the hibernate configuration.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="hibernate-configuration" type="NHibernate.Cfg.ConfigurationSectionHandler, NHibernate"/>
</configSections>
<hibernate-configuration xmlns="urn:nhibernate-configuration-2.2">
<session-factory>
...
</session-factory>
</hibernate-configuration>
</configuration>
|
|
|
|
|
Develop a menu based application which provides the facility to convert temperature and length from one unit to another.
Running the application will display the main “Form”, this form will have a menu with the caption “File” there will be two “submenus” under this menu, with the caption “Temperature” and “Length” (as shown below)
Clicking on “Temperature” will display another form with the caption “Temperature”. (as shown below). Here temperature will be entered in “Celsius”, and then unit of resulting value will be specified through two radio buttons. Clicking the “Compute” button will cause the entered value, converted to the unit specified through radio buttons. E.g. if user enters 12, then selects “Kelvin” radio button, then after clicking “Compute” the result will be calculated by converting the “Celsius” to Kelvin.
The formulae used for conversion are as follows:
C = (F - 32) x 5/9
K = C + 273
F = (C x 9/5) + 32
Similarly Length converter will convert the length in “Kilometers” to “Meters” and “Centimeters” e.g. if you enter “20” and select “Meter” radio button, then after clicking the “Compute” button will display the result by converting 20 to “Meter” unit.
Hint:
1 KM = 1000 M
1 M = 100 CM
|
|
|
|
|
A few points:
1 - a Win32 app is an app written in C++ without MFC. You can't use VB.NET for that
2 - This is obviously homework. you have two choices here, they are, do your own homework, and ask specific questions as you get stuck, or, pay someone to write it for you/pray you find someone stupid enough to write it for you for free. If you don't do your own homework, you will eventually fail your course. The fact is, the world does NOT need another temperature conversion program, the task is designed to build your programming skills. If you don't learn how to do this, how will you approach the project you get given next, which builds on those skills.
I suggest you either do some research, write some code, and ask only *specific* questions ( and in the right forum ), or you approach your teacher for either help, or advice on how to transfer to an arts course.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Point 1. You are asking people how to write a program, so presumably you think that they are reasonably clever? Why on earth do you think that
sweety2006 wrote: Hint:
1 KM = 1000 M
1 M = 100 CM
would be necessary.
Point 2. Unless you are obliged to by the specification, you should not put your conversion menu options in the File main menu. Believe it or not the File menu is supposed to be for File related actions, and, by convention, Exiting the application.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
actually the hint is wrong, it should have been:
1 km = 1000 m
1 m = 100 cm
The International System[^] standardizes units (m for meter, M for molar), prefixes (k for 1000, c for 0.01, there is no C). K is often used to indicate "binary kilo" or 1024 although according to IEC that should be Ki for kibi (yikes). Kilobyte[^]
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|
|
Thanks for the link.
I didn't actually read it, just observed that it was there.
I once had a cat called 'kibi', really.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
sweety2006 wrote: K = C + 273
That can't be right as the Kelvin[^] scale is meant to have positive values only.
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|
|
erm... 0 Kelvin is absolute zero, right ? So, why can't this be right ? According to the link you provided:
[K] = [°C] + 273.15
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
yours is a lot better, temperatures are real numbers, not integers, and physicists are fighting to get below -273°C, so these last centigrades do matter (and cost a lot).
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|
|
OK, you mean the .15 ? Well, this is obviously his homework, so that's why they kept it simple.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|
|
Hi,
I have created the table structure and added the composite primary keys to the ms-access table using VB.NET. while the control crosses the line "ADOXtable.Columns("CHARX_VALUE_COL").Properties("Nullable").Value = False", an error message raised as "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done."
ADOXtable = New ADOX.Table
ADOXtable.Name = "ACN_CHARX_INSTANCE"
ADOXtable.Columns.Append("LOGICAL_DB_NAME", ADOX.DataTypeEnum.adVarWChar, 32)
ADOXtable.Columns.Append("DIM_NAME", ADOX.DataTypeEnum.adVarWChar, 32)
ADOXtable.Columns.Append("CHARX_NAME", ADOX.DataTypeEnum.adVarWChar, 128)
ADOXtable.Columns.Append("CHARX_TABLE", ADOX.DataTypeEnum.adVarWChar, 128)
ADOXtable.Columns.Append("CHARX_VALUE_COL", ADOX.DataTypeEnum.adVarWChar, 128)
ADOXtable.Columns.Append("VALUES_UNIQUE", ADOX.DataTypeEnum.adInteger)
ADOXtable.Columns.Append("CHARX_ORDER_COL", ADOX.DataTypeEnum.adVarWChar, 128)
ADOXtable.Columns.Append("CHARX_ORDER", ADOX.DataTypeEnum.adInteger)
ADOXtable.Columns.Append("CHARX_NUMERIC_COL", ADOX.DataTypeEnum.adVarWChar, 128)
ADOXtable.Columns.Append("BITMAP_COL", ADOX.DataTypeEnum.adVarWChar, 128)
'append tables to database
cat.Tables.Append(ADOXtable)
key1.Name = "PrimaryKey"
key1.Type = ADOX.KeyTypeEnum.adKeyPrimary
key1.Columns.Append("LOGICAL_DB_NAME")
key1.Columns.Append("DIM_NAME")
key1.Columns.Append("CHARX_NAME")
key1.Columns.Append("CHARX_TABLE")
ADOXtable.Keys.Append(key1)
ADOXtable.Columns("CHARX_VALUE_COL").Properties("Nullable").Value = False
ADOXtable.Columns("VALUES_UNIQUE").Properties("Nullable").Value = True
ADOXtable.Columns("CHARX_ORDER_COL").Properties("Nullable").Value = True
ADOXtable.Columns("CHARX_ORDER").Properties("Nullable").Value = True
ADOXtable.Columns("CHARX_NUMERIC_COL").Properties("Nullable").Value = True
ADOXtable.Columns("BITMAP_COL").Properties("Nullable").Value = True
Please provide your valuable comments.
Thanks,
Sivakumar.M.
|
|
|
|
|
I would take that you mean that you have to commit the new columns to the database before you attempt to modify them and make the column nullable.
|
|
|
|
|
hi i have MS VB 2005 EE application ...in my application user can download my application from a website and they can fill out a form and submit the information to my remote server ....
what i need to do is i want the data sending by the users through web will be in encrypted form and data recived in my place is in decrypted form ...
how to acheive help needed>>>>
tHANK YOU FOR IN ADVANCE
|
|
|
|
|
"hi everyone need help" - please read the forum guidelines
harieshkumar.n wrote: what i need to do is i want the data sending by the users through web will be in encrypted form and data recived in my place is in decrypted form ...
Use the System.Cryptography namespace to do this.
Christian Graus
Driven to the arms of OSX by Vista.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
|
|
|
|