DevExpress menus and vb.net

I found your sample code in here from 2010 for DevExpress menus but it's not in vb.net. Any chance you have a vb.net sample of how to work this into a bar button and something more current if you have it?

Thanks,

Keith

Okay, I figured some things out I think. Still not sure about all of it.

Here's what I'm working with:

- My current project is a Windows Forms application (using VB.NET 4.0, VS 2012)- Updates will be taken from a server on my client's LAN, not the internet- My startup form is named "xfrmMain"- I use Developer Express tools so my menu bar is theirs, not native .net- I use Inno Setup

Here's what I want to have happen:

- When the user runs my application I want it to check for updates immediately and if there are updates to get them. Of course I want the user to know what's happening but no options to stop the update.- I'd also like to have an udpate button in my menu bar so that if the user keeps the program running for a long period of time he can check manually

I followed the tutorial and got some things working.

- I created a WyBuild project with a tab for version 1.0 (empty)- I added the AutomaticUpdater.dll (for .net 4) to my references in my application- I added "Imports wyDay.Controls" to the form in which I'm calling the updater- I added an instance of the AutomaticUpdater to the form from my tookbox but I suspect that isn't necessary for what I'm trying to accomplish- Based on the othe question from someone else that I mentioned above I added the following code to my "check for updates" menu button

Using aube As AutomaticUpdaterBackend = New AutomaticUpdaterBackend Try Select Case aube.UpdateStepOn Case UpdateStepOn.Checking, UpdateStepOn.DownloadingUpdate, UpdateStepOn.ExtractingUpdate aube.Cancel() Exit Select Case UpdateStepOn.UpdateReadyToInstall, UpdateStepOn.UpdateAvailable, UpdateStepOn.UpdateDownloaded aube.InstallNow() Exit Select Case Else aube.ForceCheckForUpdate() Exit Select End Select Catch ex As Exception MessageBox.Show(ex.Message) Finally aube.Dispose End Try End Using

- I also added this to the very beginning of the Load even of my main form

barBtnCheckForUpdates.PerformClick()

- I created an Inno Setup as I've done for years and installed my application- Back to my WyBuild project...- I created a folder in my application directory tree to store the version 1.0 files and I added the current versions of all the application's files to version 1.0 tab of WyBuild- I made some small modifications and changed the version # of my application- I compiled it and copied all the files to a version 1.1 folder and then dragged those into a version 1.1 tab in WyBuild- I then clicked the 2 build buttons in WyBuild and copied the files in the "updates" folder to the download folder I set up.- It sort of works (see below)

Questions:

- I'm confused about the reason for even using an installer other than to get the first version of my application on the target computer. Once the first version is installed, the following versions are updated using WyBuild. Am I missing something?- Can I use UNC paths for the download site setting or does it have to be mapped to a letter? You don't include a UNC example in the page I worked with.- Does the version # in my application settings or my inno setup impact WyBuild versioning or behavior in any way at all?- For what I'm doing it seems that wyUpdate.exe and client.wyc are completely unecessary. If I'm wrong, what do I do with them? I'm not clear here.- When I run it after the first update, nothing happens unless I close my application and run it a second time. Then the updates happen.- If I don't include the barBtnCheckForUpdates.PerformClick() line in my Load event and rely only on the menu button, I have to click it twice for anythign to happen and then it seems to work.- If I run my application when there are no updates to install (or I click my "check for updates" button) I get the error "You must call the initialize() function before you can use any other functions"- Is it possible to specify the download location in my .net application's code rather than always having it hard coded into the WyBuild project? I'd like to store the location in my app's config file.

Sorry for the hard to read code block. I don't see how to show it like code like in many other forums I'm used to using.

Keith

It's been a full week with no reply at all. Does it typically take this long to get help? 🤔

Sorry, that was our bad, this was classified as a "self solved" post internally (meaning you had already solved it). Clearly we misclassified it.

>> "- I'm confused about the reason for even using an installer other than to get the first version of my application on the target computer. Once the first version is installed, the following versions are updated using WyBuild. Am I missing something?"

No, that's correct.

>> "- Can I use UNC paths for the download site setting or does it have to be mapped to a letter? You don't include a UNC example in the page I worked with."

That'll work.

>> "- Does the version # in my application settings or my inno setup impact WyBuild versioning or behavior in any way at all?"

Nope.

>> "- For what I'm doing it seems that wyUpdate.exe and client.wyc are completely unecessary. If I'm wrong, what do I do with them? I'm not clear here."

wyUpdate.exe is the brains of the operation. It's what does the updating. wyUpdate needs the client.wyc.

>> "- When I run it after the first update, nothing happens unless I close my application and run it a second time. Then the updates happen."

Right, that's by design. If the automaticUpdater control was visible the user would be able to install the update immediately.

>> "- If I don't include the barBtnCheckForUpdates.PerformClick() line in my Load event and rely only on the menu button, I have to click it twice for anythign to happen and then it seems to work.">> "- If I run my application when there are no updates to install (or I click my "check for updates" button) I get the error "You must call the initialize() function before you can use any other functions""

Don't check immediately when your form loads. Let the AutomaticUpdater do it. That's what it's designed for.

>> "- Is it possible to specify the download location in my .net application's code rather than always having it hard coded into the WyBuild project? I'd like to store the location in my app's config file."

Yes: https://wyday.com/wybuild/help/wyupdate-commandline.php#server

https://wyday.com/wybuild/help/wyupdate-commandline.php#updatepath